<?php
include_once 'dbconnect.php';

// 查询用户是否存在
function dblogin($username,$passwd){
    $link = initDBconnect();
    $sql = "SELECT user_id FROM users where user_name = '$username' and user_passwd = '$passwd'";
    $result = mysqli_query($link,$sql);
    
    return mysqli_num_rows($result);
}